<template>
  <div>
    <h1>A组件,{{count.num}}</h1>
    <n-button type="primary" size="medium" @click="handlePlus">
      数字+
    </n-button>
    <div v-for="item in star.list" :key="item.id">
      姓名:{{item.name}} 年龄:{{item.age}}
    </div>
    <n-button type="info" size="medium" @click="handleStarPost">
      录入明星
    </n-button>

    <div v-for="(item,index) in goods.goodsList" :key="index">
     商品名称：{{ item.name }}  商品价格:{{ item.price }}
    </div>
  </div>
</template>

<script setup>
import { useCount } from '../../store/count';
import { useGoods } from '../../store/goods';
import { useStar } from '../../store/star';
const count = useCount()
const handlePlus = ()=>{
  count.num++
}
const star = useStar()
const handleStarPost = ()=>{
  star.starPost({name:'坤哥11',age:180})
}

const goods = useGoods()
</script>

<style lang="scss" scoped>

</style>